doctype html
html(lang='zh-cn')
	head
		include ../../src/head2
		title 登录
		link(rel='stylesheet', href='login.css')
		link(rel='stylesheet', href='//at.alicdn.com/t/font_439399_46x49uzz7nndbo6r.css')
		script(src='../../lib/md.js')
	body
		.mui-content.flip
			script.
				//防止某些情况出现广告图片
				function getQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
				var r = window.location.search.substr(1).match(reg);
				if (r != null) return unescape(r[2]); return null;
				}
				if (getQueryString('hideFlip'))
				document.write('<div class="group theFlip" id="app">');
				else
				document.write('<div class="group" :class="{theFlip:showLogin}" id="app">');
			.front
				button.mui-btn.mui-btn-primary.mui-btn-outlined(type='button', onclick='vm.showLogin=true') 跳过
				// 广告图片
				img(src='./splash.png')
			.back
				// 登录
				.personal-login(@tap='switchToggle1') 个人
				.manager-login(@tap='switchToggle2') 管理员
				.login-logo
					img(src='login_logo.png')
				form.mui-input-group
					.mui-input-row.login-input-row
						label
							span.mui-icon.mui-icon-person
						input.mui-input-clear(type='text', placeholder='请输入手机号、车牌号、设备号', maxlength='15', autocomplete='off', v-model='userName', ref:username_input='', required='')
					.mui-input-row.login-input-row
						label
							span.mui-icon.mui-icon-locked
						input#pw.mui-input-clear(type='password', maxlength='64', placeholder='请输入密码', autocomplete='off', v-model='password', ref:password_input='', name='f_order', value='', required='', @keyup.enter='login')
				.mui-content-padded
					.mui-button-row
						fast-button#login-btn(:disabled='!canLogin', :tap='login',style="width:90%;border-radius:1.3rem;height:2.2rem") 登 录
						a(@tap='register' style="float:left;margin-left:1rem;font-size:15px;") 注册
						a(@tap='findPassword' style="float:right;margin-right:1rem;font-size:15px;") 忘记密码?
		script(src='../../build/common/common.js')
		script(src='./login.js')
